<html>
<head><meta charset="utf-8"><title>Long lines in generated code · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Long.20lines.20in.20generated.20code.html">Long lines in generated code</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215553385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Long%20lines%20in%20generated%20code/near/215553385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Long.20lines.20in.20generated.20code.html#215553385">(Nov 04 2020 at 08:40)</a>:</h4>
<p>We have some very long lines which make grepping quite annoying, like the macro at the end of <code>parser/src/syntax_kind/generated.rs</code>. I wonder if we could format them more nicely, maybe by producing a string instead of using <code>quote!</code>.</p>



<a name="215562842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Long%20lines%20in%20generated%20code/near/215562842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Long.20lines.20in.20generated.20code.html#215562842">(Nov 04 2020 at 10:21)</a>:</h4>
<p>Should totally do that. We already have smth similar here:</p>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/blob/7c94f1cb5e86739864871dc56fcbd7a6de116315/xtask/src/codegen/gen_syntax.rs#L253">https://github.com/rust-analyzer/rust-analyzer/blob/7c94f1cb5e86739864871dc56fcbd7a6de116315/xtask/src/codegen/gen_syntax.rs#L253</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>